package reference.codes;

import java.lang.reflect.Field;

public class CodeTask {
	public static final int TASK_SEEDED = 1;
	public static final int TASK_FLOWERED = 2;
	
	public static int[] getAllTasks(){
		Field[] fields = CodeTask.class.getFields();
		int result[] = new int[fields.length];
		for(int i=0;i<fields.length;i++){
			fields[i].setAccessible(true);
			try {
				result[i] = ((Integer) fields[i].get(CodeTask.class)).intValue();
			} catch (IllegalArgumentException e) {
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
		}
		return result;
			
	}
}
